package com.zhxy.util.message;

import java.nio.ByteBuffer;

public interface MessageCodec {
	
	ByteBuffer encode(Object message);
	
	/**
	 * 
	 * @param buf
	 * @return 如果buf的数据不足以进行decode,则返回null
	 */
	Object decode(ByteBuffer buf);
}
